Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent AsyncBearerTokenCredentialPolicy deadlock #11591

Merged
merged 2 commits into from
Jun 1, 2020

Conversation

chlowell
Copy link
Member

threading.Lock is not re-entrant, so it can cause a deadlock when used by coroutines (as seen in #11543):

  1. coroutine A acquires the lock
  2. A awaits another coroutine, yielding to the loop
  3. coroutine B attempts to acquire the lock
  4. threading.Lock.acquire() blocks the thread and thus also the loop
  5. B never yields, A never resumes, the lock is never released

@chlowell chlowell added Client This issue points to a problem in the data-plane of the library. Azure.Core labels May 21, 2020
lmazuel
lmazuel previously approved these changes May 22, 2020
@chlowell
Copy link
Member Author

chlowell commented Jun 1, 2020

/check-enforcer evaluate

@chlowell chlowell merged commit bf137c2 into Azure:master Jun 1, 2020
@chlowell chlowell deleted the async-lock branch June 1, 2020 18:38
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this pull request Nov 18, 2020
s360 fixes for Azure DNS (Azure#11591)

* s360 fixes for Azure DNS

* Additional property

* Property fix

* Readonly property

* CloudError fix

* Examples. cloud error

* Avocado fix

* read.md

* Prettier
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this pull request Nov 18, 2020
s360 fixes for Azure DNS (Azure#11591)

* s360 fixes for Azure DNS

* Additional property

* Property fix

* Readonly property

* CloudError fix

* Examples. cloud error

* Avocado fix

* read.md

* Prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants